#include<bits/stdc++.h>

using namespace std;

const int N = 1e5 + 10;

int a[N];
int t[N];

int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    scanf("%d",&n);
    for(int i = 1;i <= n;i ++)
    {
        scanf("%d",&a[i]);
        t[a[i]] ++;
    }
    long long last = 0;
    for(int i = 1;i <= 1e5 + 1;i ++)
    {
        //cout << "i = " << i << " last = " << last << endl;
        if(t[i] != 0)
        {
            long long c = 0;
            if(t[i] < last)
            {
                c = last - t[i];
            }
            last = c + t[i];
        }
    }

    cout << last << endl;
    return 0;
}
